home *** CD-ROM | disk | FTP | other *** search
- void __regargs __autoopenfail(char *);
-
- #include <constructor.h>
- #include <proto/nipc.h>
-
- extern struct Library *OpenLibrary( UBYTE *libName, unsigned long version );
- extern void CloseLibrary( struct Library *library );
-
- struct Library *NIPCBase ;
- static void *libbase;
- extern long __netlibversion;
-
- CBMLIB_CONSTRUCTOR(opennipc)
- {
- NIPCBase = libbase = (void *)OpenLibrary("nipc.library", __netlibversion);
- if (NIPCBase == NULL)
- {
- __autoopenfail("nipc.library");
- return 1;
- }
-
- return 0;
- }
-
- CBMLIB_DESTRUCTOR(closenipc)
- {
- if (libbase)
- {
- CloseLibrary((struct Library *)libbase);
- libbase = NIPCBase = NULL;
- }
- }
-